package com.itheima;


import com.alibaba.excel.EasyExcel;
import com.itheima.pojo.Emp;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class WriteDemo {

    public static void main(String[] args) {
        List<Emp> empList = new ArrayList<>();

        empList.add(new Emp(1, "张三丰", 20, "男", "武当派创始人"));
        empList.add(new Emp(2, "张无忌", 18, "男", "魔教教主"));
        empList.add(new Emp(3, "赵敏", 10, "女", "元朝郡主"));

        EasyExcel.write(new File("D:\\2.xls"), Emp.class).sheet(0).doWrite(empList);
    }
}
